<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
	<head>
		<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
		<title>Son of Darts</title>
		<script type="text/javascript" src="tgd/Contests/Darts/Controller.js"></script>
		<script type="text/javascript" src="tgd/Contests/Darts/ManualFactory.js"></script>
		<script type="text/javascript" src="tgd/Contests/Darts/RandomSolutionFactory.js"></script>
		<script type="text/javascript" src="tgd/Contests/Darts/Solution.js"></script>
		<script type="text/javascript" src="tgd/Contests/Darts/Views/AllScores.js"></script>
		<script type="text/javascript" src="tgd/Contests/Darts/Views/BestScores.js"></script>
		<script type="text/javascript">
			//<![CDATA[

/*
 * ENTRY POINT
 */
var _controller = null;

function init() {
	_controller = new tgd.Contests.Darts.Controller();
}

		//]]>
		</script>
		<style type="text/css">
			body,html{margin:0;height:100%;width:100%;font-size:.8em;}
			table,thead,tbody,tr,td,th{padding:0;margin:0;}

			table{width:100%;border-collapse:collapse;border:solid 1px #333}
			table thead{background:#00f;color:#fff;font-size:1.2em;}
			table th{text-align:left;}

			#best td{width:20%;}
			#live td{width:33%;}

			#menu,#manual{color:#fff;background:#600;padding:1em;border-top:solid 1px #333;}
			#menu .item,#manual .item{margin-right:1em;}
			#menu input,#manual input{font-size:1em;border:none;padding:0;margin:0;}
		</style>
	</head>
	<body onload="init();">
		<div id="menu">
			<span class="item">
				#Darts:&nbsp;
				<input type="text" id="txtNumDarts" maxlength="1"  size="1" title="[3-6]" />
			</span>
			<span class="item">
				#Regions:&nbsp;
				<input type="text" id="txtNumRegions" maxlength="2" size="2" title="3:1-40 4:1-30 5:1-20 6:1-10" />
			</span>
			<span class="item">
				Maximum Region Value:&nbsp;
				<input type="text" id="txtMaxRegVal" maxlength="4" size="4" title="..." onkeyup="if (event.keyCode == 13) { _controller.addThing(); }" />
			</span>
			<span class="item">
				<a class="timerButton" href="javascript:_controller.addThing();">Add</a>
			</span>
		</div>
		<div id="manual">
			<span class="item">
				#Darts:&nbsp;
				<input type="text" id="txtManNumDarts" maxlength="1"  size="1" title="[3-6]" />
			</span>
			<span class="item">
				Regions:&nbsp;
				<input type="text" id="txtManRegions" maxlength="150" size="20" title="Array of regions (including zero)." onkeyup="if (event.keyCode == 13) { _controller.addManualSolution(); }" />
			</span>
			<span class="item">
				<a class="manButton" href="javascript:_controller.addManualSolution();">Add</a>
			</span>
			<span id="manResults" class="item">
				&nbsp;
			</span>
		</div>
		<h1>Best Scores</h1>
		<div id="best">
		</div>
		<h1>Live Scores</h1>
		<div id="live">
		</div>
	</body>
</html>